package co.fitstart.weapp.api.entity;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import co.fitstart.entity.site.RoomType;

/**
 * 
 * @author haiyan_xiao
 *
 */
public class Appointment {

    private Long siteId;
    
    private Long coachId;
    
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date occurDate;
    
    private String occurHour;
    
    private RoomType roomType;
    
    /**
     * The default constructor
     */
    public Appointment() {
    }
    
    /**
     * 
     * @return
     */
    public boolean isValid() {
        return this.siteId != null && this.occurDate != null &&
                StringUtils.isNotBlank(this.occurHour);
    }

    /**
     * @return the siteId
     */
    public Long getSiteId() {
        return siteId;
    }

    /**
     * @return the coachId
     */
    public Long getCoachId() {
        return coachId;
    }

    /**
     * @return the occurDate
     */
    public Date getOccurDate() {
        return occurDate;
    }

    /**
     * @return the occurHour
     */
    public String getOccurHour() {
        return occurHour;
    }

    /**
     * @return the roomType
     */
    public RoomType getRoomType() {
        return roomType;
    }

    /**
     * @param siteId the siteId to set
     */
    public void setSiteId(Long siteId) {
        this.siteId = siteId;
    }

    /**
     * @param coachId the coachId to set
     */
    public void setCoachId(Long coachId) {
        this.coachId = coachId;
    }

    /**
     * @param occurDate the occurDate to set
     */
    public void setOccurDate(Date occurDate) {
        this.occurDate = occurDate;
    }

    /**
     * @param occurHour the occurHour to set
     */
    public void setOccurHour(String occurHour) {
        this.occurHour = occurHour;
    }

    /**
     * @param roomType the roomType to set
     */
    public void setRoomType(RoomType roomType) {
        this.roomType = roomType;
    }
}
